package com.lifeonwalden.game.mindustry.entity;

import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.lifeonwalden.game.mindustry.constant.GroundType;
import com.lifeonwalden.game.mindustry.feature.TextureUnit;

/**
 * ground resource unit
 */
public class Ground implements TextureUnit {
    public GroundType type;

    // coordinate
    public short x, y;

    @Override
    public TextureRegion texture() {
        return this.type.texture;
    }

    @Override
    public short x() {
        return this.x;
    }

    @Override
    public short y() {
        return this.y;
    }

    @Override
    public void x(short x) {
        this.x = x;
    }

    @Override
    public void y(short y) {
        this.y = y;
    }

    @Override
    public void doJobBefore() {

    }

    @Override
    public void draw(Batch batch) {
        batch.draw(this.type.texture, this.x, this.y);
    }

    @Override
    public void doJobAfter() {

    }
}
